package com.zhuang.factory.simplefactory;

/**
 * @Classname ShapeFactoryTest
 * @Description 简单工厂测试类
 * @Date 2021/3/18 15:47
 * @Created by dell
 */

public class ShapeFactoryTest {
    public static void main(String[] args) {
        Shape rectangle = ShapeFactory.createShape("Rectangle");
        rectangle.draw();

        Shape circle = ShapeFactory.createShape("Circle");
        circle.draw();

        Shape square = ShapeFactory.createShape("Square");
        square.draw();

    }
}
